<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 权重 1 */
        li{
            color: #000;
        }

        /* 权重 1 + 1 = 2 */
        ul li{
            color: red;
        }

        /* 权重 10 */
        .blue{
            color: blue;
        }

        /* 交集选择器  权重 10 + 1 = 11 */
        li.blue{
            color: pink;
        }

        /* 权重 10 + 1 + 1 + 1 = 13 */
        .nav ul li a{
            color: pink;
        }

        /* 权重 10 + 10 = 20 */
        .nav .tel{
            color: green;
        }
    </style>
</head>
<body>
    <ul>
        <li class="blue">我是li</li>
    </ul>

    <div class="nav">
        <ul>
            <li>
                <a href="#">电器</a>
            </li>
            <li>
                <a href="#">电脑</a>
            </li>
            <li>
                <a href="#" class="tel">手机</a>
            </li>
        </ul>
    </div>
</body>
</html>